package com.china08.yxyapi.entity.db.questionbank;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.china08.yxyapi.entity.BaseEntityNoId;

/**
 * 
 * 
 * 题库: 章节信息
 *
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "yxy_quesbank_book_contents", catalog = "yxy_question_bank")
public class YxyQuesbankBookContents extends BaseEntityNoId {

    /**
     * 章节id
     */
    @Id
    @Column(length = 32)
    private String id;

    @Column(nullable = false, columnDefinition = "varchar(32) comment 'parent identity' ")
    private String pId;

    @Column(columnDefinition = "varchar(255) comment '章节名称' ", nullable = false)
    private String name;

    // 0代表不是 1代表是父节点
    @Column(columnDefinition = "tinyint default 0 comment '0代表不是 1代表是父节点' ", nullable = false)
    private Integer isParent;

    @Column(columnDefinition = "varchar(32) comment '对应的book表中的book_id' ", nullable = false)
    private String bookId;

    // 是否是最后一级节点 0不是 1是
    @Column(columnDefinition = "tinyint default 0 comment '是否是最后一级节点 0不是 1是' ", nullable = false)
    private Integer isLast = 0;

    /**
     * 是否使用，0--不使用 ，1--使用
     */
    @Column(columnDefinition = "tinyint default 1 comment '是否使用，0--不使用 ，1--使用' ", nullable = false)
    private Integer status = 1;

    /**
     * 排序字段
     */
    @Column(columnDefinition = "int default 100 comment '排序字段' ", nullable = false)
    private Integer orderNum = 100;

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return the pId
     */
    public String getpId() {
        return pId;
    }

    /**
     * @param pId
     *            the pId to set
     */
    public void setpId(String pId) {
        this.pId = pId;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name
     *            the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the isParent
     */
    public Integer getIsParent() {
        return isParent;
    }

    /**
     * @param isParent
     *            the isParent to set
     */
    public void setIsParent(Integer isParent) {
        this.isParent = isParent;
    }

    /**
     * @return the bookId
     */
    public String getBookId() {
        return bookId;
    }

    /**
     * @param bookId
     *            the bookId to set
     */
    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    /**
     * @return the isLast
     */
    public Integer getIsLast() {
        return isLast;
    }

    /**
     * @param isLast
     *            the isLast to set
     */
    public void setIsLast(Integer isLast) {
        this.isLast = isLast;
    }

    /**
     * @return the status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status
     *            the status to set
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * @return the orderNum
     */
    public Integer getOrderNum() {
        return orderNum;
    }

    /**
     * @param orderNum
     *            the orderNum to set
     */
    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

}
